﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DALScolarite
{
    public partial class scolarite_ensunites
    {
        uvtmoyEntities ent;
        public List<scolarite_ensunites> unite(string ideltdiplome)
        {
            ent = new uvtmoyEntities();
            var query = from s in ent.scolarite_ensunites
                        where s.idEltDiplome == ideltdiplome
                        select s;
            if (query.Any())
            {

                return query.ToList();
            }
            else
            {
                return null;
            }
        }


        public List<scolarite_ensunites> uniteSemestre(string ideltdiplome,string idsemestre)
        {
            ent = new uvtmoyEntities();
            var query = from s in ent.scolarite_ensunites
                        where s.idEltDiplome == ideltdiplome
                                && s.idsemestres == idsemestre
                        select s;
            if (query.Any())
            {

                return query.ToList();
            }
            else
            {
                return null;
            }
        }
    }
}
